/* 基础样式 */
body {
    margin: 0;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 头部样式 */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.header-actions button {
    padding: 8px 16px;
    font-size: 14px;
}

.header-actions button i {
    font-size: 14px;
}

/* 按钮基础样式 */
.primary-btn, .secondary-btn, .warning-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    transition: background-color 0.2s;
}

/* 主要按钮 */
.primary-btn {
    background: #1a73e8;
}

.primary-btn:hover {
    background: #1557b0;
}

/* 次要按钮 */
.secondary-btn {
    background: #5f6368;
}

.secondary-btn:hover {
    background: #4a4d51;
}

/* 警告按钮 */
.warning-btn {
    background: #d93025;
}

.warning-btn:hover {
    background: #b3261e;
}

/* 表格样式 */
.page-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
}

.page-table th,
.page-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.page-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.page-table tr:hover {
    background-color: #f8f9fa;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}



/* 表单样式 */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* 编辑器样式 */
.ck-editor__editable {
    min-height: 300px;
    max-height: 500px;
}

.ck-content .image {
    margin: 1em 0;
    max-width: 100%;
}

.ck-content .image img {
    max-width: 100%;
    height: auto;
}

/* 其他工具类 */
.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 0;
}

.close-btn:hover {
    color: #333;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.action-buttons button {
    padding: 6px 12px;
    font-size: 13px;
}

.page-update-time {
    color: #666;
    font-size: 13px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .header-actions button {
        flex: 1;
        min-width: 120px;
    }
} 

/* 编辑器容器样式 */
#pageEditor {
    height: 300px;
    margin-bottom: 20px;
}

/* Quill 编辑器自定义样式 */
.ql-toolbar.ql-snow {
    border-radius: 4px 4px 0 0;
    border-color: #ddd;
}

.ql-container.ql-snow {
    border-radius: 0 0 4px 4px;
    border-color: #ddd;
} 

/* 隐藏文件输入框 */
#importFile {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
} 

/* 复选框样式 */
.page-checkbox, #selectAll {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* 批量删除按钮样式 */
#batchDeleteBtn {
    margin-left: auto;
}

/* 选中行的样式 */
.page-table tr:has(.page-checkbox:checked) {
    background-color: #f8f9fa;
} 

/* 在现有样式基础上添加 */

.editor-container {
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#bookEditor {
    height: calc(100vh - 200px);
    margin-bottom: 20px;
}

/* Quill 编辑器自定义样式 */
.ql-toolbar.ql-snow {
    border-radius: 8px 8px 0 0;
    border-color: #ddd;
}

.ql-container.ql-snow {
    border-radius: 0 0 8px 8px;
    border-color: #ddd;
} 

.progress-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.progress-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 300px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: #1a73e8;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    color: #333;
    margin: 10px 0;
}